﻿using Deferred.Library.Scene;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Deferred.Editor.Scene
{
    public class SpotLightWrapper
    {
        public SpotLight SpotLight { get; private set; }

        public float PositionX { get { return SpotLight.Position.X; } set { SpotLight.Position = new Vector3(value, SpotLight.Position.Y, SpotLight.Position.Z); } }
        public float PositionY { get { return SpotLight.Position.Y; } set { SpotLight.Position = new Vector3(SpotLight.Position.X, value, SpotLight.Position.Z); } }
        public float PositionZ { get { return SpotLight.Position.Z; } set { SpotLight.Position = new Vector3(SpotLight.Position.X, SpotLight.Position.Y, value); } }

        public byte ColorR { get { return SpotLight.Color.R; } set { SpotLight.Color = new Color(value, SpotLight.Color.G, SpotLight.Color.B); } }
        public byte ColorG { get { return SpotLight.Color.G; } set { SpotLight.Color = new Color(SpotLight.Color.R, value, SpotLight.Color.B); } }
        public byte ColorB { get { return SpotLight.Color.B; } set { SpotLight.Color = new Color(SpotLight.Color.R, SpotLight.Color.G, value); } }

        public float LookAtX { get { return SpotLight.LookAt.X; } set { SpotLight.LookAt = new Vector3(value, SpotLight.LookAt.Y, SpotLight.LookAt.Z); } }
        public float LookAtY { get { return SpotLight.LookAt.Y; } set { SpotLight.LookAt = new Vector3(SpotLight.LookAt.X, value, SpotLight.LookAt.Z); } }
        public float LookAtZ { get { return SpotLight.LookAt.Z; } set { SpotLight.LookAt = new Vector3(SpotLight.LookAt.X, SpotLight.LookAt.Y, value); } }

        public SpotLightWrapper(SpotLight sportLight)
        {
            this.SpotLight = sportLight;
        }
    }
}
